'use strict'

const Koa = require('koa');
const cors = require('koa2-cors');
const controllers = require('./controllers');
const modles = require('./modles');

let app = new Koa();

app.use(cors());

app.use(controllers(app));

modles.sync(true);

let port = 4000;
app.listen(port);
console.log(`浏览器运行于:http://localhost:${port}`);